package cn.com.shopec.erp.common.utils;

import java.util.Random;

/** 
 * @ClassName: RandomUtil 
 * @Description: 随机数、随机字符串工具类
 * @author: lule
 * @date 2012-12-17 下午04:58:42
 *  
 */

public final class RandomUtil {

	/** 
	 * @Title: getRandomNumberStr 
	 * @Description: 获得特定长度的一串随机数字
	 * @param length
	 * @return  
	 * @throws 
	 * @author: lule
	 * @date: 2012-12-17下午05:30:00
	 */
	public static String getRandomNumberStr(int length){
		StringBuilder builder = new StringBuilder();
		Random random = new Random();
		for(int i = 0 ; i < length; i++){
			builder.append(random.nextInt(9));
		}
		return builder.toString();
	}
	
}
